// components/my-innnerCommodity/my-createAddress/my-createAddBody/my-createAddBody.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    lis:[
      {id:0,title:'收货人',content:'请填写收货人姓名'},
      {id:1,title:'手机号码',content:'请填写收货人手机号码'},
      {id:2,title:'地址',content:'请填写地址'},
      {id:3,title:'门牌号',content:'请填写门牌号'}
    ],
    name:'',
    phoneNumber:0,
    address:'',
    houseNumber:0
  },

  /**
   * 组件的方法列表
   */
  methods: {
    setDefaultAddress(e){
      console.log(e.detail.value);
    },
    saveMessage(){
      // var packagea={name:this.data.name,phoneNumber:this.data.phoneNumber,address:this.data.address,houseNumber:this.data.houseNumber},
     
    },
    confirmValue(e){
      var id=e.target.dataset.id
      if(id===0){
        this.setData({
          name:e.detail.value
        })
        console.log(this.data.name);
      }else if(id===1){
        this.setData({
          phoneNumber:e.detail.value
        })
        console.log(this.data.phoneNumber);
      }else if(id===2){
        this.setData({
          address:e.detail.value
        })
        console.log(this.data.address);
      }else if(id===3){
        this.setData({
          houseNumber:e.detail.value
        })
        console.log(this.data.houseNumber);
      }
    }
  }
})
